﻿/*===================================================
* CLR版本  : 4.0.30319.42000 
* 类名称   : AEvent
* 文 件 名 : AEvent 
* 类描述   :
* 创建人   : oream
* 创建时间 : 2018/3/11 22:20:49
* 修改人   : 
* 修改时间 :
* 版本： @version 1.0
=====================================================*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hotfix
{
  public abstract class AEvent : IEvent
  {
    public abstract void Run();

    public void Handle()
    {
      this.Run();
    }

    public void Handle(object a)
    {
      throw new NotImplementedException();
    }

    public void Handle(object a, object b)
    {
      throw new NotImplementedException();
    }

    public void Handle(object a, object b, object c)
    {
      throw new NotImplementedException();
    }
  }



  public abstract class AEvnet<T> : IEvent
  {
    public abstract void Run(T obj);
    public void Handle()
    {
      throw new NotImplementedException();
    }

    public void Handle(object a)
    {
      this.Run((T)a);
    }

    public void Handle(object a, object b)
    {
      throw new NotImplementedException();
    }

    public void Handle(object a, object b, object c)
    {
      throw new NotImplementedException();
    }
  }

  public abstract class AEvnet<T1, T2> : IEvent
  {
    public abstract void Run(T1 obj1, T2 obj2);
    public void Handle()
    {
      throw new NotImplementedException();
    }

    public void Handle(object a)
    {
      throw new NotImplementedException();
    }

    public void Handle(object a, object b)
    {
      this.Run((T1)a, (T2)b);
    }

    public void Handle(object a, object b, object c)
    {
      throw new NotImplementedException();
    }
  }

  public abstract class AEvnet<T1, T2, T3> : IEvent
  {

    public abstract void Run(T1 obj1, T2 obj2, T3 obj3);

    public void Handle()
    {
      throw new NotImplementedException();
    }

    public void Handle(object a)
    {
      throw new NotImplementedException();
    }

    public void Handle(object a, object b)
    {
      throw new NotImplementedException();
    }

    public void Handle(object a, object b, object c)
    {
      this.Run((T1)a, (T2)b, (T3)c);
    }
  }
}
